import http from '@/utils/request.js';
// 事务工单接口
// 详情页面
export const getOffairDetail = (data) => {
	// return http.get('/sida-maintain-repair/maintainplanaffair/detail',data);
	return http.request({
		url: '/sida-maintain-repair/maintainplanaffair/detail',
		method: 'get',
		data
	});
};

// 完成事务工单

export const finishOffair = (data) => {
	// return http.post('/sida-maintain-repair/maintainplanaffair/finish',data);
	return http.request({
		url: '/sida-maintain-repair/maintainplanaffair/finish',
		method: 'post',
		data,
	});
};

// 质检工单详情
export const getZjDetail = (data) => {
	// return http.get('/repait/plan/check/detail',data);
	return http.request({
		url: '/repait/plan/check/detail',
		method: 'get',
		data
	});
};
// 获取问题日详情

// 质检工单详情
export const getCheckReason = (data) => {
	// return http.get('/repait/plan/check/getDictList',data);
	return http.request({
		url: '/repait/plan/check/getDictList',
		method: 'get',
		data
	});
};

// 查询质检通过的缓存

export const getCheckPass = (data) => {
	// return http.get('/repait/plan/check/detail/v2',data);
	return http.request({
		url: '/repait/plan/check/detail/v2',
		method: 'get',
		data
	});
};

// 完成||通过提交
export const checkFinish = (data) => {
	// return http.post('/repait/plan/check/update',data,true);
	return http.request({
		url: '/repait/plan/check/update',
		method: 'post',
		data,
		textJson: true,
	});
};

// 质检不通过查询缓存
export const getCheckNoPass = (data) => {
	// return http.get('/repair/maintain/malfunction/history/detail',data);
	return http.request({
		url: '/repair/maintain/malfunction/history/detail',
		method: 'get',
		data
	});
};
// 维修记录
export const addOrUpdateRecord = (data) => {
	// return http.post('/repair/maintain/malfunction/history/save', data, true);
	return http.request({
		url: '/repair/maintain/malfunction/history/save',
		method: 'post',
		data,
		textJson: true,
	});
	// textJson
};
// 工单关联任务

export const getReformList = (data) => {
	// return http.get('/repait/plan/check/getCheckChildPlanList', data);
	return http.request({
		url: '/repait/plan/check/getCheckChildPlanList',
		method: 'get',
		data
	});
};